

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Savvy Solutions</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1;IE=8;FF=3;OtherUA=4" />
<script type="text/javascript" src="/js/functions.js"></script>
<script type="text/javascript" src="/js/editor/tiny_mce.js"></script>

<script type="text/javascript">var _show_editor=false;</script><style type="text/css" media="all">@import "/css/global.css";</style>
<title>Savvy Solutions</title><link rel="stylesheet" type="text/css" href="/css/coreBlue.css">

<link rel="stylesheet" type="text/css" href="/css/coreBlue.css">

<link rel="stylesheet" type="text/css" href="/css/defaultThemeNew.css?OpenPage">
<link rel="stylesheet" type="text/css" href="/css/iehacks1.css">
<link rel="stylesheet" type="text/css" href="/css/global.css">
<link rel="stylesheet" type="text/css" href="/css/blog.css">
<link rel="stylesheet" type="text/css" href="/css/celestica_microsite.css">
<link rel="stylesheet" type="text/css" href="/css/nyroModal.css">
<link rel="stylesheet" type="text/css" href="/css/busCard.css">
<link rel="stylesheet" type="text/css" href="/css/jquery.cluetip.css">
<link rel="stylesheet" type="text/css" media="all" href="/css/layout5_setup.css" />


<SCRIPT LANGUAGE="JavaScript" SRC="/js/scriptsevents.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="/js/jquery.js"  TYPE='text/javascript'></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="/js/jtip.js"  TYPE='text/javascript'></SCRIPT>
<script language="JavaScript" type="text/javascript" src="/js/calendar.js"></script>

<script language="JavaScript" type="text/javascript">


function ImageCrop(returnField, specialParameters) {

	frm = window.document.forms[0];
	var url = "/" + frm.imgPath.value;
	    setTimeout("window.open('/utils/image-crop.jsp?Bkey=&open=1&returnfield=" + returnField + specialParameters + "', 'popupWindow', 'toolbar=no,directories=no,status=no,scrollbars=auto,resizable=yes,resize=yes,menubar=no,height=460,width=700')", 1);
}
	
	





<!-- 

//AJaX Name Picker
function getSingleName(returnField, specialParameters) {

frm = window.document.forms[0];
var url = "/" + frm.imgPath.value;
    setTimeout("window.open('/utils/contact-remote.jsp?open&returnfield=" + returnField + specialParameters + "', 'popupWindow', 'toolbar=no,directories=no,status=no,scrollbars=yes,resizable=yes,resize=yes,menubar=no,height=410,width=900')", 1);
}

function GetMultiNames(returnField, specialParameters) {
frm = window.document.forms[0];
var url = "/" + frm.imgPath.value;
    var turl =  url + "/NABPickerMulti?open&returnfield=" + returnField + specialParameters;
    turl = "/utils/contact-multi-remote.jsp?open&returnfield=" + returnField + specialParameters;
    var wchrome = "toolbar=no,directories=no,status=no,scrollbars=yes,resizable=yes,resize=yes,"
    wchrome += "menubar=no,height=500,width=1000,top=20,left=50";
    setTimeout("window.open('" + turl +  "', 'popupWindow', '" + wchrome + "')", 1);
}

function RemoveBestOfBestpick()
{

var cont = confirm( "You are about to remove selected solution from your Picks, Do you want to continue?");
        if ( !cont) return;
currusername=document.getElementById("logguser").innerHTML
curdocid=document.getElementById("loggdocid").innerHTML
frm=document.forms[0]
/*if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}*/
//for ie
    if (window.XMLHttpRequest) {
        // we are in a non-IE browser
        xmlhttp=new XMLHttpRequest()
    } else if (window.ActiveXObject) {
        // we are in IE
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
    }
agturl= "/" + frm.imgPath.value+"/agtremovefromBestOFBestPick?openagent&"+currusername+"&"+curdocid
xmlhttp.open("GET",agturl,false)
xmlhttp.send()
xmlstr=xmlhttp.responseText
alert(ReplaceTags(xmlstr).replace(/^\s\s*/, '').replace(/\s\s*$/, ''));

//document.getElementById("agtresponse").innerHTML=xmlstr
//alert(document.getElementById("agtresponse").innerText)
//location.href="/" + frm.imgPath.value+"/frmShowSCPicks?OpenForm&login"
location.href=location.href
}

function limitText(limitField, limitCount, limitNum) {

    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } else {
        limitCount.value = limitNum - limitField.value.length;
    }
}

function Submitsavvy()
{
       var btn = document.getElementById( "btnSubmitIdeaGenerator");
        if (QuerySave(document.forms[0]) && validatecustomfields(document.forms[0].chkBenefits) && validateFinanBenefit(document.getElementsByName("Finance"))) { 
        var cont = confirm( "You are about to submit the solution. Do you want to continue?");
                if ( !cont) return;
        //tinyMCE.triggerSave();
        btn.click();
    }
    

}

function savesavvy()
{
    //tinyMCE.triggerSave();
    var btn = document.getElementById( "btnSaveIdeaGeneratoradmin");
    //IF NOT VALIDATED THEN SOME DEFAULT VALUES ARE SAVED..ALWAYS VALIDATED - SRVAN
    if (QuerySave(document.forms[0]) && validatecustomfields(document.forms[0].chkBenefits) && validateFinanBenefit(document.getElementsByName("Finance"))) { 
        var cont = confirm( "You are about to save the solution. Do you want to continue?");
                if ( !cont) return;
        btn.click();
        //alert("Solution is Saved");
    }
}

/*
var xmlhttp = new getXMLObject();    //xmlhttp holds the ajax object
function ajaxFunction() {
      if(xmlhttp) {
        var txtname = document.getElementById("txtname");
        xmlhttp.open("POST","newsolutionadoption",true); //getname will be the servlet name
        xmlhttp.onreadystatechange  = handleServerResponse;
        xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        xmlhttp.send("txtname=" + txtname.value); //Posting txtname to Servlet
      }
    }
     */
     
     
     

function savesavvyadmin()
{
tinyMCE.triggerSave();
var btn = document.getElementById( "btnSaveIdeaGeneratoradmin");
btn.click();
alert("Thank You! Solution is Saved");
}

function deletedraftsavvy()
{
var btn = document.getElementById( "btnDeletesavvysolution");
var cont = confirm( "You are about to delete this draft solution. Do you want to continue?");
        if ( !cont) return;
                
btn.click();

}

function cancelsavvy()
{
	document.location.href= "/home.jsp"
	
	/*
frm=document.forms[0];
dbName=document.forms[0].dbName.value
HTTP_Referer=document.forms[0].HTTP_Referer.value
if (HTTP_Referer=="") {
document.location.href= "/home.jsp"
}
else{
document.location.href=HTTP_Referer
}
//var tmpurl="/" +dbName + "/vwAllSolutionsdocs?OpenView&Start=1&Count=10"
*/

}

function showTimeBar()
{
 width = document.body.clientWidth;
 height = document.body.clientHeight;
 Hoffset = img.offsetHeight;
 Woffset = img.offsetWidth;
 img.style.left = (width-Woffset)/2;
 img.style.top = (height-Hoffset)/2;
 img.style.visibility = "visible";
}

function Editsavvy()
{
var btn = document.getElementById( "btnEditdoc");

var cont = confirm( "You are about to edit the Solution, Do you want to continue?");
        if ( !cont) return;
                
btn.click();

}

function commfeddback()
{
var btn = document.getElementById( "btnCommFeedback");

var cont = confirm( "You are about to submit feedback continue?");
        if ( !cont) return;
                
if (QuerySave(document.forms[0])) { btn.click() };
}


function chgBG(src,color) { src.bgColor = color }



function pageview(k)
{
f = document.forms[0]
//------------------------
oXsl = new ActiveXObject("Microsoft.XMLDOM")
oXsl.async = false
oXsl.load("/" + f.dbName.value + "/z_cv.xsl?openpage");
//------------------------
//alert("/" + f.dbName.value + "/vwMainView?ReadViewEntries&start="+k+"Count=10&CollapseView")
st = getHtmlFromXml("/" + f.dbName.value + "/View All?ReadViewEntries&Start="+k+"&Count=10&CollapseView")  
idContent.innerHTML = st
}
function toggleSection(obj, bSync)
{
    objLink = obj.nextSibling   
    objCont = objLink.nextSibling

    if(objCont.style.display == 'block' && !bSync)
    {
        objCont.style.display = 'none';
        obj.innerText = '+ '
    }
    else
    {
        objCont.style.display = 'block';
        obj.innerText = '- ' 
    }
    if(objCont.children.length == 0)
    {
        objCont.innerHTML = '<span>Loading ...</span>'
        //alert(objLink.NextEntrySrc)
        objCont.innerHTML = getHtmlFromXml(objLink.NextEntrySrc)
    }   

}

function loadXMLDoc(fname)
{
  var xmlDoc;
  // code for IE
  if (window.ActiveXObject)
  {
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  }
  // code for Mozilla, Firefox, Opera, etc.
  else if (document.implementation
  && document.implementation.createDocument)
  {
    xmlDoc=document.implementation.createDocument("","",null);
   }
  else
  {
    alert('Your browser cannot handle this script');
  }
xmlDoc.async=false;
xmlDoc.load(fname);
return(xmlDoc);
}

function getHtmlFromXml(xmlsrc)
{
       
}

function doSync(strPos)
{

    ar = strPos.split(".")
    temp = ""
    for(i = 0; i < ar.length - 1; i++)
    {   
        temp = temp + ar[i]
        obj = document.getElementById(temp)
        toggleSection(obj.children(0), true)
        temp = temp + "."
    }
    obj.scrollIntoView()
}

function myabc(obj)
{

objCont=document.getElementById("b"+obj.id)
    if(objCont.style.display == 'block' )
    {
        objCont.style.display = 'none';
    
    }
    else
    {
        objCont.style.display = 'block';
    
    }

}

function addtomybasketold()
{
var btn = document.getElementById( "btnAddBasket");

var cont = confirm( "You are about to add selected solution to your basket, Do you want to continue?");
        if ( !cont) return;
btn.click();

}

function addtomybasket()
{
var btn = document.getElementById( "btnAddBasket");


currusername=document.getElementById("logguser").innerHTML
curdocid=document.getElementById("loggdocid").innerHTML

frm=document.forms[0]
/*if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}*/
//for ie
    if (window.XMLHttpRequest) {
        // we are in a non-IE browser
        xmlhttp=new XMLHttpRequest()
    } else if (window.ActiveXObject) {
        // we are in IE
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
    }
agturl= "/" + frm.imgPath.value+"/agtaddtomybasket?openagent&"+currusername+"&"+curdocid
xmlhttp.open("GET",agturl,false)
xmlhttp.send()
xmlstr=xmlhttp.responseText
alert(ReplaceTags(xmlstr).replace(/^\s\s*/, '').replace(/\s\s*$/, ''));
//document.getElementById("agtresponse").innerHTML=xmlstr
//alert(document.getElementById("agtresponse").innerText)
location.href=location.href
}



function removefrommybasketold()
{
var btn = document.getElementById( "btnRemoveBasket");

var cont = confirm( "You are about to remove selected Solution from your Favourites, Do you want to continue?");
        if ( !cont) return;
btn.click();

}

function removefrommybasket()
{
var btn = document.getElementById( "btnRemoveBasket");

var cont = confirm( "You are about to remove selected solution from your Favourites, Do you want to continue?");
        if ( !cont) return;
currusername=document.getElementById("logguser").innerHTML
curdocid=document.getElementById("loggdocid").innerHTML
frm=document.forms[0]
/*if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}*/
//for ie
    if (window.XMLHttpRequest) {
        // we are in a non-IE browser
        xmlhttp=new XMLHttpRequest()
    } else if (window.ActiveXObject) {
        // we are in IE
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
    }
agturl= "/" + frm.imgPath.value+"/agtremovefrommybasket?openagent&"+currusername+"&"+curdocid
xmlhttp.open("GET",agturl,false)
xmlhttp.send()
xmlstr=xmlhttp.responseText
alert(ReplaceTags(xmlstr).replace(/^\s\s*/, '').replace(/\s\s*$/, ''));

//document.getElementById("agtresponse").innerHTML=xmlstr
//alert(document.getElementById("agtresponse").innerText)
location.href="/" + frm.imgPath.value+"/frmShowMyBasket?OpenForm&login"
//location.href=location.href
}

function removefromGMpick()
{

var cont = confirm( "You are about to remove selected solution from your Picks, Do you want to continue?");
        if ( !cont) return;
currusername=document.getElementById("logguser").innerHTML
curdocid=document.getElementById("loggdocid").innerHTML
frm=document.forms[0]
/*if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}*/
//for ie
    if (window.XMLHttpRequest) {
        // we are in a non-IE browser
        xmlhttp=new XMLHttpRequest()
    } else if (window.ActiveXObject) {
        // we are in IE
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
    }
agturl= "/" + frm.imgPath.value+"/agtremovefromGMPick?openagent&"+currusername+"&"+curdocid
xmlhttp.open("GET",agturl,false)
xmlhttp.send()
xmlstr=xmlhttp.responseText
alert(ReplaceTags(xmlstr).replace(/^\s\s*/, '').replace(/\s\s*$/, ''));

//document.getElementById("agtresponse").innerHTML=xmlstr
//alert(document.getElementById("agtresponse").innerText)
//location.href="/" + frm.imgPath.value+"/frmShowSCPicks?OpenForm&login"
location.href=location.href
}


function removefromSCpick()
{
var btn = document.getElementById( "btnRemovePick");

var cont = confirm( "You are about to remove selected solution from Site Coach Pick, Do you want to continue?");
        if ( !cont) return;
curdocid=document.getElementById("loggdocid").innerHTML
frm=document.forms[0]
/*if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}*/
//for ie
    if (window.XMLHttpRequest) {
        // we are in a non-IE browser
        xmlhttp=new XMLHttpRequest()
    } else if (window.ActiveXObject) {
        // we are in IE
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
    }
agturl= "/" + frm.imgPath.value+"/agtremovefromSCpick?openagent&"+curdocid
xmlhttp.open("GET",agturl,false)
xmlhttp.send()
xmlstr=xmlhttp.responseText
alert(ReplaceTags(xmlstr).replace(/^\s\s*/, '').replace(/\s\s*$/, ''));

//document.getElementById("agtresponse").innerHTML=xmlstr
//alert(document.getElementById("agtresponse").innerText)
//location.href="/" + frm.imgPath.value+"/frmShowSCPicks?OpenForm&login"
location.href=location.href
}



function clickd(aaa)
{
//alert(aaa.id)
//alert(document.getElementById("td"+aaa.id).innerText)
k=document.getElementById("td"+aaa.id).innerText
document.location.href="/"+dbName+"/frmSolTeamLeadSearch?openform&"+k

}

function removeAdopt(aaa)
{
alert("Remove Adopt")
alert(aaa.id)

curdocid=document.getElementById("loggdocid").innerHTML
curuser = document.getElementById("curUsername").innerHTML
alert(curuser)
//document.location.href="/"+dbName+"/agtRemoveAdoption?openagent&"+aaa.id
//location.href=location.href
}


function addExpert()
{
var cont = confirm( "You are about to recommend this solution as an expert. Do you want to continue?");
        if ( !cont) return;
currusername=document.getElementById("logguser").innerHTML
curdocid=document.getElementById("loggdocid").innerHTML
frm=document.forms[0]
if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
vurl= "/" + frm.imgPath.value+"/agtaddExpertValidation?openagent&"+currusername+"&"+curdocid

//checking whether browser is mozila or Netscape
    if (window.XMLHttpRequest) 
    {   
//      alert('INSIDE HTTP')
        req = new XMLHttpRequest();
//      alert(req+' - - req - - ')
        //req.overrideMimeType('text/xml');

        req.onreadystatechange = processReqChange_lookup;
        req.open("GET", vurl , true);
        req.send(null);
             } 
        //checking whether browser is IE 
    else if (window.ActiveXObject)
    {
//          alert('entered the else of XMLHTTPRequest--- '+ window.ActiveXObject)
        req=new ActiveXObject("Microsoft.XMLHTTP")
        
         if (req)
       { 

        req.onreadystatechange = processReqChange_lookup;
        req.open("GET", vurl, true);
        req.send();
                }
                } 
}

function ReplaceTags(htmlstr){
      var regExp = /<\/?[^>]+>/gi;
        htmlstr = htmlstr.replace(regExp,"");
        return htmlstr;
      }

//new coded by siva

var req;
function processReqChange_lookup()
{  

    if (req.readyState == 4)             
 /*Only process if XML file is loaded completely:4="Complete" */
  {

         if (req.status == 200)           
 /*Only process if everything is ok*/
            { 

xmlstr=req.responseText
populatelookup(xmlstr)
                } 
     else 
     {
        alert("There was a problem retrieving the XML data:n" + req.statusText);
             }
             
          }
        }
        function populatelookup(xmlstr)
{

document.getElementById("recomm").innerHTML=xmlstr
//alert(document.getElementById("recomm").innerText)
//alert(xmlstr)
var substr=xmlstr
//alert(substr.indexOf("not recommended"))
if(substr.indexOf("not recommended")>0)
{
//alert("dddddd")
document.getElementById("showdialogExpert").click()

}
else
{
alert("You have already recommended , thanks")
}
}
//for question responses
var xmlstr=""

function processReqChange_lookupQresp()
{ 


    if (req.readyState == 4)             
 /*Only process if XML file is loaded completely:4="Complete" */
  {

         if (req.status == 200)           
 /*Only process if everything is ok*/
            { 

xmlstr=req.responseText
populatelookupQresp(xmlstr)
                } 
     else 
     {
        alert("There was a problem retrieving the XML data:n" + req.statusText);
             }
             
          }
        }
    function    populatelookupQresp(xmlstr)
{
var curdocid=document.getElementById("currdocunid").innerHTML
var dbName=document.getElementById("currdatabasepath").innerText

document.getElementById("idQResponses").innerHTML=xmlstr

jQuery.noConflict();
jQuery(document).ready(function(){
jQuery('#sticky').cluetip({sticky: true, closePosition: 'title', arrows: true });
jQuery('#sticky2').cluetip({sticky: true, closePosition: 'title', arrows: true });
jQuery('#sticky3').cluetip({sticky: true, closePosition: 'title', arrows: true });
jQuery('#sticky4').cluetip({sticky: true, closePosition: 'title', arrows: true });
jQuery('#sticky5').cluetip({sticky: true, closePosition: 'title', arrows: true });
jQuery('#sticky6').cluetip({sticky: true, closePosition: 'title', arrows: true });
jQuery('#sticky7').cluetip({sticky: true, closePosition: 'title', arrows: true });

var tempcounter=document.getElementById("counterQ").innerText

for(i=1;i<=tempcounter;i++)
{

jQuery("#Qaccordion"+i).accordion({



autoHeight: false,
icons: {
                header: "ui-icon-circle-arrow-e",
                headerSelected: "ui-icon-circle-arrow-s"
            }
            
        });
}


  var dialogOptsExpert = {
        modal: true,
        bgiframe: true,
        autoOpen: false,
        height: 300,
        width: 500,
        draggable: true,
        resizeable: true,
close: function(event, ui){  
location.reload(true);
    } ,
buttons: {
                'Post Recommendation': function() {
                if(document.getElementById("expertComments").value=="")
                {
                alert("Please fill in the Comments")
                return false;
                }
var dataString = 'expertComments='+document.getElementById("expertComments").value+"@@@parentid="+document.getElementById("parentid").value+"@@@postedby="+document.getElementById("postedby").value+"@@@postedon="+document.getElementById("postedon").value;
jQuery.ajax({
type: "POST",
url: "/"+dbName+"/agtaddExpert?openagent",
data: dataString,
success: function() {



}
})
alert("Thank you! Your recommendation is saved.");
                   jQuery(this).dialog('close');
//document.location.href=document.location.href
                },
                Cancel: function() {
                    jQuery(this).dialog('close');
                }

},
            
        open: function() {
        //display correct dialog content


        

        jQuery("#ExpertRecommendation").load("/"+dbName+"/frmDialogExpertComm?openform&currdocunid="+curdocid);

}
        };
//end of expert reocmme

    //define config object
   var dialogOpts = {
        modal: true,
        bgiframe: true,
        autoOpen: false,
        height: 300,
        width: 500,
        draggable: true,
        resizeable: true,
buttons: {
                'Post Question': function() {
                if(document.getElementById("Question").value=="")
                {
                alert("Please fill in the question")
                return false;
                }
var dataString = 'question='+document.getElementById("Question").value+"@@@parentid="+document.getElementById("parentid").value+"@@@postedby="+document.getElementById("postedby").value+"@@@postedon="+document.getElementById("postedon").value;
jQuery.ajax({
type: "POST",
url: "/"+dbName+"/agtWriteQuestion?openagent",
data: dataString,
success: function() {



}
})
alert("Thanks for posting question");
                   jQuery(this).dialog('close');
document.location.href=document.location.href
                },
                Cancel: function() {
                    jQuery(this).dialog('close');
                }

},
            
        open: function() {
        //display correct dialog content


        

        jQuery("#postquestion").load("/"+dbName+"/frmDialogQuestion?openform&currdocunid="+curdocid);

}
        };

    //define dialog config for response object
   var dialogOptsRes = {
        modal: true,
        bgiframe: true,
        autoOpen: false,
        height: 300,
        width: 500,
        draggable: true,
        resizeable: true,
buttons: {
                'Reply Question': function() {
                   if(document.getElementById("QuestionReply").value=="")
                {
                alert("Please fill in the Reply")
                return false;
                }

                
var dataString = 'questionreply='+document.getElementById("QuestionReply").value+"@@@parentid="+document.getElementById("parentid").value+"@@@postedby="+document.getElementById("postedby").value+"@@@postedon="+document.getElementById("postedon").value+"@@@qid="+document.getElementById("qid").value;
jQuery.ajax({
type: "POST",
url: "/"+dbName+"/agtWriteReply?openagent",
data: dataString,
success: function() {


}
})
alert("Thanks for posting the reply");
                   jQuery(this).dialog('close');
document.location.href=document.location.href
                },
Cancel: function() {
                    jQuery(this).dialog('close');
                }
},
            
        open: function() {
        //display correct dialog content
jQuery("#"+this.id+"").load("/"+dbName+"/frmDialogReply?openform&currdocunid="+curdocid+"&Qid="+this.id);


}
        };

    jQuery("#postquestion").dialog(dialogOpts); //end dialog
    jQuery('#showdialog').click(
        function (){
            jQuery("#postquestion").dialog("open");
            return false;
        }
    );
    jQuery('#showdialogbottom').click(
        function (){
            jQuery("#postquestion").dialog("open");
            return false;
        }
    );
    
    
    
    jQuery("#ExpertRecommendation").dialog(dialogOptsExpert);   //end dialog
    jQuery('#showdialogExpert').click(
        function (){

            jQuery("#ExpertRecommendation").dialog("open");
            return false;
        }
    );
    




jQuery('a.cancel').click(function() {  
  var a = this;  
    jQuery("#r"+this.id).dialog(dialogOptsRes); //end dialog
jQuery("#r"+this.id).dialog("open");
            return false;


});
//for expert recommendation 

});


}

function printcomment()
{
dbName=document.forms[0].dbName.value
parentdocid=document.getElementById("currdocunid").innerHTML
var tmpurl="/" +dbName + "/frmPrint?openform&docid="+parentdocid+""
window.open(tmpurl)
//document.location.href=tmpurl
}

function trim(str, chars) {
    return ltrim(rtrim(str, chars), chars);
}
 
function ltrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
 
function rtrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
// for photo effects

//Image zoom in/out script- by javascriptkit.com
//Visit JavaScript Kit (http://www.javascriptkit.com) for script
//Credit must stay intact for use

var zoomfactor=0.05 //Enter factor (0.05=5%)

function zoomhelper(){
if (parseInt(whatcache.style.width)>10&&parseInt(whatcache.style.height)>10){
whatcache.style.width=parseInt(whatcache.style.width)+parseInt(whatcache.style.width)*zoomfactor*prefix
whatcache.style.height=parseInt(whatcache.style.height)+parseInt(whatcache.style.height)*zoomfactor*prefix
}
}

function zoom(originalW, originalH, what, state){
if (!document.all&&!document.getElementById)
return
whatcache=eval("document.images."+what)
prefix=(state=="in")? 1 : -1
if (whatcache.style.width==""||state=="restore"){
whatcache.style.width=originalW+"px"
whatcache.style.height=originalH+"px"
if (state=="restore")
return
}
else{
zoomhelper()
}
beginzoom=setInterval("zoomhelper()",100)
}

function clearzoom(){
if (window.beginzoom)
clearInterval(beginzoom)
}

function SaveMPS()
{
alert("SaveMPS");
//alert(DocID);
}
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
document._domino_target = "_self";
function _doClick(v, o, t, h) {
  var form = document._frmsavvy;
  if (form.onsubmit) {
     var retVal = form.onsubmit();
     if (typeof retVal == "boolean" && retVal == false)
       return false;
  }
  var target = document._domino_target;
  if (o.href != null) {
    if (o.target != null)
       target = o.target;
  } else {
    if (t != null)
      target = t;
  }
  form.target = target;
  form.__Click.value = v;
  if (h != null)
    form.action += h;
  form.submit();
  return false;
}
// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
function clear1()
{
document.forms[0].SearchQuery1.value=""

}

function copydata()
{

document.forms[0].SearchQuery.value=document.forms[0].SearchQuery1.value
}
function srchQuery()
{
temp=document.getElementById("SearchQuery").value
currDBPath=document.getElementById("currDBPath").value
document.location.href="/" +currDBPath +"/frmTmpSearchDoc?createdocument&"+temp
}


// -->
</script>

<script language="JavaScript" type="text/javascript">
<!-- 
function IsNumber(val) {
oneDecimal = false;
inputVal = val; 
  inputStr = inputVal.toString();
 for (var i = 0; i < inputStr.length; i++) { 
     var oneChar = inputStr.charAt(i);
    if (i == 0 && oneChar == "-") {
    if (inputStr.length == 1) {
       return false;
    }else{
      continue
    }
    }
   if( inputStr.length != 1 && oneChar == "." && !oneDecimal) { 
       oneDecimal = true;
       continue;
  }
   if( oneChar < "0" || oneChar > "9") { 
       return false;
  }
}
return true;
}

function validatecustomfields(radVal){

 var radChk=radVal;
 if(radChk[1].checked){
   if (document.forms[0].taQuality.value==''){
   alert("Please enter appropriate value for Quality results");
   return false;
    } 
   //select quality option
   
    if (document.forms[0].cmbQualityOptions.selectedIndex == 0) {
                     sFieldValue = "";
       } else {
                     sFieldValue = String(document.forms[0].cmbQualityOptions.selectedIndex);
       }
       
       if (sFieldValue=="") {
      alert("Please enter appropriate value for Quality option")
     }
     else{
return true;
            }      
  //endselect quality option
 } else if(radChk[2].checked){
   if (document.forms[0].taDays.value==''){
   alert("Please enter appropriate value for Order Lead Time");
   } 
  else{
    return true;
            }
 } 
  else return true;

}

function validateFinanBenefit(radVal)
 {
 var radChk=radVal;

if(radChk[0].checked==false && radChk[1].checked==false && radChk[2].checked==false)
{
alert("Please select at least one of the Financial Benefit categories");
return false;
}

if(radChk[0].checked==true && radChk[1].checked==true && radChk[2].checked==false)
{
    if (document.forms[0].HardSavings.value!='' && document.forms[0].CostAvoid.value!='')
    {
        if (document.forms[0].HardSavings.value=="0" || document.forms[0].CostAvoid.value=="0")
        {
            alert("Please enter a value > 0 for the Financial Benefit category");
            return false;
        }
        else
        {
            return true;
        }
    }
    else
    {
    alert("Please enter a value for the selected Financial Benefit category (Hard Savings, Cost Avoidance, Opportunity Costs)");
    return false;
    }
    
}

else if(radChk[0].checked==true && radChk[1].checked==false && radChk[2].checked==true)
{
    if (document.forms[0].HardSavings.value!='' && document.forms[0].OpporCost.value!='')
    {
    if (document.forms[0].HardSavings.value=="0" || document.forms[0].OpporCost.value=="0")
        {
            alert("Please enter a value > 0 for the Financial Benefit category");
            return false;
        }
        else
        {
            return true;
        }
    }
    else
    {
    alert("Please enter a value for the selected Financial Benefit category (Hard Savings, Cost Avoidance, Opportunity Costs)");
    return false;
    }
}

else if(radChk[0].checked==true && radChk[1].checked==true && radChk[2].checked==true)
{
    if (document.forms[0].HardSavings.value!='' && document.forms[0].CostAvoid.value!='' && document.forms[0].OpporCost.value!='')
    {
    if (document.forms[0].HardSavings.value=="0" || document.forms[0].CostAvoid.value=="0" || document.forms[0].OpporCost.value=="0")
        {
            alert("Please enter a value > 0 for the Financial Benefit category");
            return false;
        }
        else
        {
            return true;
        }
    }
    else
    {
    alert("Please enter a value for the selected Financial Benefit category (Hard Savings, Cost Avoidance, Opportunity Costs)");
    return false;
    }
}

else if(radChk[0].checked==true && radChk[1].checked==false && radChk[2].checked==false)
{
    if (document.forms[0].HardSavings.value!='')
    {
    if (document.forms[0].HardSavings.value=="0")
        {
            alert("Please enter a value > 0 for the Financial Benefit category");
            return false;
        }
        else
        {
            return true;
        }
    }
    else
    {
    alert("Please enter a value for the selected Financial Benefit category (Hard Savings, Cost Avoidance, Opportunity Costs)");
    return false;
    }
}

else if(radChk[0].checked==false && radChk[1].checked==true && radChk[2].checked==false)
{
    if (document.forms[0].CostAvoid.value!='')
    {
    if (document.forms[0].CostAvoid.value=="0")
        {
            alert("Please enter a value > 0 for the Financial Benefit category");
            return false;
        }
        else
        {
            return true;
        }
    }
    else
    {
    alert("Please enter a value for the selected Financial Benefit category (Hard Savings, Cost Avoidance, Opportunity Costs)");
    return false;
    }
}

else if(radChk[0].checked==false && radChk[1].checked==false && radChk[2].checked==true)
{
    if (document.forms[0].OpporCost.value!='')
    {
    if (document.forms[0].OpporCost.value=="0")
        {
            alert("Please enter a value > 0 for the Financial Benefit category");
            return false;
        }
        else
        {
            return true;
        }
    }
    else
    {
    alert("Please enter a value for the selected Financial Benefit category (Hard Savings, Cost Avoidance, Opportunity Costs)");
    return false;
    }
}

else if(radChk[0].checked==false && radChk[1].checked==true && radChk[2].checked==true)
{
    if (document.forms[0].CostAvoid.value!='' && document.forms[0].OpporCost.value!='')
    {
    if (document.forms[0].CostAvoid.value=="0" || document.forms[0].OpporCost.value=="0")
        {
            alert("Please enter a value > 0 for the Financial Benefit category");
            return false;
        }
        else
        {
            return true;
        }
    }
    else
    {
    alert("Please enter a value for the selected Financial Benefit category (Hard Savings, Cost Avoidance, Opportunity Costs)");
    return false;
    }
}
else if(radChk[0].checked==false && radChk[1].checked==false && radChk[2].checked==false)
{
    return true;
}
 
} // End of Function


function getFieldValue ( theField, vType ) { 
         //this function will return the field value (or value list) based on the element type 
         
         theValue = ""; 
         sep = ""; 
         hits = 0; 
         //text is the user-entered value as a string
         if ( vType == "Text" ) return ( theField.value ); 

         //textarea is the user-entered value as a string array of one element
         if ( vType == "Textarea" ) return ( theField[0].value ); 
         
           //checkboxes & radio buttons are not so simple
        if ( vType == "Checkbox" || vType == "Radio" ) { 
        
                if ((theField.value != null) && (theField.checked ))
                
                 theValue = theField.value
            
                else for ( i = 0; i < theField.length; i++ ) { 
                
                    if ( theField[i].checked ) { 
                    
                          hits++; 
                        if ( hits > 1 ) {
                            sep = "; ";
                          } 
                      theValue += sep + theField[i].value; 
                } 
          }
          return ( theValue );
      } 
       
       
     //select is an array of selection pointers to an array of strings representing the choices
     if ( vType == "Select" ) { 
          for ( i = 0; i < theField.options.length; i++ ) {
                if ( theField.options[i].selected ){
                if( theField.options[i].value !=""){
                    theValue += theField.options[i].value;
                }else{
                    theValue += theField.options[i].text;
                }   
            }   
          } 
          return ( theValue );
     }
}

function hideApprovers(radVal){

 var radChk=document.getElementsByName(radVal.name);
 if(radChk[1].checked){
   document.getElementById('chkquality').style.visibility='visible';
    document.getElementById('chkdays').style.visibility='hidden';
         //document.getElementById('chkprodsav').style.visibility='hidden';
   //document.getElementById('chkmatsav').style.visibility='hidden';
      } else if(radChk[2].checked){
   document.getElementById('chkquality').style.visibility='hidden';
    document.getElementById('chkdays').style.visibility='visible';
         //document.getElementById('chkprodsav').style.visibility='hidden';
   //document.getElementById('chkmatsav').style.visibility='hidden';
 } 
else {
 document.getElementById('chkquality').style.visibility='hidden';
    document.getElementById('chkdays').style.visibility='hidden';
         //document.getElementById('chkprodsav').style.visibility='hidden';
   //document.getElementById('chkmatsav').style.visibility='hidden';
  }
}

function hideFinanApprovers(CurVal){
 var radChk=document.getElementsByName(CurVal.name);
 
 
 document.getElementById('hasHardSavings').value = radChk[0].checked;
 document.getElementById('hasCostAvoidance').value = radChk[1].checked;
 document.getElementById('hasOppurtunityCost').value = radChk[2].checked;


 if(radChk[0].checked==true && radChk[1].checked==true && radChk[2].checked==false)
{
    document.getElementById('chkhardsaves').style.visibility='visible';
    document.getElementById('chkcostavoid').style.visibility='visible';
    document.getElementById('chkopporcost').style.visibility='hidden';
    document.forms[0].OpporCost.value="";
}

else if(radChk[0].checked==true && radChk[1].checked==false && radChk[2].checked==true)
{
    document.getElementById('chkhardsaves').style.visibility='visible';
    document.getElementById('chkcostavoid').style.visibility='hidden';
     document.getElementById('chkopporcost').style.visibility='visible';
     document.forms[0].CostAvoid.value="";
}

else if(radChk[0].checked==true && radChk[1].checked==true && radChk[2].checked==true)
{
    document.getElementById('chkhardsaves').style.visibility='visible';
    document.getElementById('chkcostavoid').style.visibility='visible';
     document.getElementById('chkopporcost').style.visibility='visible';
}

else if(radChk[0].checked==true && radChk[1].checked==false && radChk[2].checked==false)
{
    document.getElementById('chkhardsaves').style.visibility='visible';
    document.getElementById('chkcostavoid').style.visibility='hidden';
     document.getElementById('chkopporcost').style.visibility='hidden';
     document.forms[0].CostAvoid.value="";
     document.forms[0].OpporCost.value="";
}

else if(radChk[0].checked==false && radChk[1].checked==true && radChk[2].checked==false)
{
    document.getElementById('chkhardsaves').style.visibility='hidden';
    document.getElementById('chkcostavoid').style.visibility='visible';
     document.getElementById('chkopporcost').style.visibility='hidden';
     document.forms[0].HardSavings.value="";
     document.forms[0].OpporCost.value="";
}

else if(radChk[0].checked==false && radChk[1].checked==false && radChk[2].checked==true)
{
    document.getElementById('chkhardsaves').style.visibility='hidden';
    document.getElementById('chkcostavoid').style.visibility='hidden';
     document.getElementById('chkopporcost').style.visibility='visible';
     document.forms[0].HardSavings.value="";
     document.forms[0].CostAvoid.value="";     
}

else if(radChk[0].checked==false && radChk[1].checked==true && radChk[2].checked==true)
{
    document.getElementById('chkhardsaves').style.visibility='hidden';
    document.getElementById('chkcostavoid').style.visibility='visible';
     document.getElementById('chkopporcost').style.visibility='visible';
     document.forms[0].HardSavings.value="";
}

else if(radChk[0].checked==false && radChk[1].checked==false && radChk[2].checked==false)
{
    document.getElementById('chkhardsaves').style.visibility='hidden';
    document.getElementById('chkcostavoid').style.visibility='hidden';
     document.getElementById('chkopporcost').style.visibility='hidden';
     document.forms[0].HardSavings.value="";
     document.forms[0].CostAvoid.value="";     
     document.forms[0].OpporCost.value="";     
}

}

// -->
</script>
</head>
<body text="#000000" bgcolor="#FFFFFF" >




<%@ page import="com.google.appengine.api.blobstore.BlobstoreServiceFactory" %>
<%@ page import="com.google.appengine.api.blobstore.BlobstoreService" %>

<%
   BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
%>





<form  method="post" action="<%= blobstoreService.createUploadUrl("/newsolutionsubmission")%>" enctype="multipart/form-data"  name="_frmsavvy">
<input type="hidden" name="__Click" value="0"><input type="hidden" value="/"  id="dbPath">
<div id="printmsg"  style="display:none"></div>
<div style="display:none">
<input name="photodocid" value=""></div>
<div id="logguser" style="display:none">(Celestica)</div>
<div id="newdocunid" style="display:none">FB41197327E84D1385257A55000F47AE</DIV>
<div id="loggdocid" style="display:none">FB41197327E84D1385257A55000F47AE</div>
<div id="agtresponse"></div><div style="display:none">/
<input name="AttachmentNames" value=""></div>
<div style="display:none">Draft</div>
<div style="display:none">Yes</div>
<div id="issupereditadmin" style="display:none">Yes</div>
<div id="currdocunid" style="display:none">FB41197327E84D1385257A55000F47AE</DIV>
<div id="currdatabasepath" style="display:none">/</DIV>
<input name="imgPath" type="hidden" value="/">






<script type="text/javascript">
if (_show_editor){
var dbName="global/collaboration/savvysol.nsf"
    tinyMCE.init({
mode :"textareas",
                theme : "advanced",
                width : "500",
                        editor_deselector : "myNonBasicEditor",
    plugins: "inlinepopups,advimage,table,emotions",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_path_location : "bottom",
        theme_advanced_resizing : true,
theme_advanced_buttons1 :"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,cleanup,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,|,sub,sup",
theme_advanced_fonts : "Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace",
        content_css : "styles/editor.css",
theme_advanced_path : "false",
relative_urls : false,
document_base_url : "/",
            external_image_list_url : "/js/pagRTEImages.js",
        content_css : "/css/editor.css"
    })
}
</script>
<input type="hidden" name="Query_String_val" value="">
<input type="hidden" id="currDBPath" value="/">
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/js/FusionCharts.js"  TYPE='text/javascript'></SCRIPT>
<!--</form>-->